

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/favicon.png">
  <link rel="icon" href="/img/favicon.png">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="Cheney">
  <meta name="keywords" content="Coding">
  
    <meta name="description" content="程序通过对不同大小的随机和顺序序列用顺序搜索、折半搜索、二叉搜索树搜索、平衡二叉搜索树搜索。分析不同算法的平均运行时间，得到不同大小，不同顺序下最优的搜索方法。">
<meta property="og:type" content="article">
<meta property="og:title" content="搜索效率比较">
<meta property="og:url" content="https://cheney822.gitee.io/2020/12/06/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E5%AE%9E%E9%AA%8C--%E6%90%9C%E7%B4%A2%E6%95%88%E7%8E%87%E6%AF%94%E8%BE%83/index.html">
<meta property="og:site_name" content="Cheney blog">
<meta property="og:description" content="程序通过对不同大小的随机和顺序序列用顺序搜索、折半搜索、二叉搜索树搜索、平衡二叉搜索树搜索。分析不同算法的平均运行时间，得到不同大小，不同顺序下最优的搜索方法。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/1844e5ca63be4512ac73fc3d3a0786b6-20220405210737430-20220405210753026.png">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/4daed30015ce4a67a90028e6d7395411-20220405210737465-20220405210753061.png">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/9af88e496e194ca5a7ff2007751f01b9-20220405210753124.png">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAQ2hlbmV5ODIy,size_14,color_FFFFFF,t_70,g_se,x_16-20220405210753165.png">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAQ2hlbmV5ODIy,size_14,color_FFFFFF,t_70,g_se,x_16-20220405210737766-20220405210753204.png">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/20459da0aa1c4852a1f951b642bd7815-20220405210753244.png">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/e1fcd06430c54f0c9ff0da2b8a362095-20220405210753285.png">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/3428257ff2bd4bd68422c9504e6277ae-20220405210753321.png">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/3018996254604e3ba8b16c2eddce1c7d-20220405210753356.png">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/0d336424743d45168d37617e311f6a4e-20220405210753391.png">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/426f3c93dbe743238a47f1b650422334-20220405210753427.png">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/df069356230a4f90a2f8c2baca1362fe-20220405210753461.png">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/f1392503dd3d4b5aac010610b2b11068-20220405210753497.png">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/2714468c96444808befb09572655028f-20220405210753533.png">
<meta property="og:image" content="https://imgbed.cheney.cc/picgo/7cf0076fe28b493fa0dcd019f5b8ff55-20220405210753569.png">
<meta property="article:published_time" content="2020-12-06T05:14:00.000Z">
<meta property="article:modified_time" content="2022-04-05T13:14:28.127Z">
<meta property="article:author" content="Cheney">
<meta property="article:tag" content="二叉树">
<meta property="article:tag" content="搜索">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://imgbed.cheney.cc/picgo/1844e5ca63be4512ac73fc3d3a0786b6-20220405210737430-20220405210753026.png">
  
  
  <title>搜索效率比较 - Cheney blog</title>

  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@4/github-markdown.min.css" />
  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/hint.css@2/hint.min.css" />

  
    
    
      
      <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@10/styles/github-gist.min.css" />
    
  

  
    <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3/dist/jquery.fancybox.min.css" />
  


<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_ba1fz6golrf.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_lbnruvf0jn.css">


<link  rel="stylesheet" href="/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    var CONFIG = {"hostname":"cheney822.gitee.io","root":"/","version":"1.8.14","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"right","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"copy_btn":true,"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":1},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":false,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname","ignore_local":false}},"search_path":"/local-search.xml"};
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
<meta name="generator" content="Hexo 5.4.1"></head>


<body>
  <header style="height: 70vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/">
      <strong>Cheney Blog</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                首页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              &nbsp;<i class="iconfont icon-search"></i>&nbsp;
            </a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner" id="banner" parallax=true
         style="background: url('https://imgbed.cheney.cc/Blog_config/default.png') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="page-header text-center fade-in-up">
            <span class="h2" id="subtitle" title="搜索效率比较">
              
            </span>

            
              <div class="mt-3">
  
  
    <span class="post-meta">
      <i class="iconfont icon-date-fill" aria-hidden="true"></i>
      <time datetime="2020-12-06 13:14" pubdate>
        2020年12月6日 下午
      </time>
    </span>
  
</div>

<div class="mt-1">
  
    <span class="post-meta mr-2">
      <i class="iconfont icon-chart"></i>
      2.3k 字
    </span>
  

  
    <span class="post-meta mr-2">
      <i class="iconfont icon-clock-fill"></i>
      
      
      12 分钟
    </span>
  

  
  
</div>

            
          </div>

          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div class="py-5" id="board">
          <article class="post-content mx-auto">
            <!-- SEO header -->
            <h1 style="display: none">搜索效率比较</h1>
            
            <div class="markdown-body">
              <h1 id="一、课程设计题目与要求"><a href="#一、课程设计题目与要求" class="headerlink" title="一、课程设计题目与要求"></a>一、课程设计题目与要求</h1><p> 【问题描述】<br>生成N个整数序列，序列分为两组：顺序序列和随机序列，在其中搜索最大的n个数。<br>对顺序序列采用顺序搜索、折半搜索、二叉排序树、平衡二叉排序树进行搜索；<br>对随机序列采用顺序搜索、二叉排序树、平衡二叉排序树进行搜索。<br>其中N=500,1000,2000,5000,10000,20000,30000,50000。n=N/100</p>
<p>要求：<br>（1）分析最坏情况下不同搜索算法的复杂度；<br>（2）统计分析并比较不同搜索算法在N取值不同时的性能，完成以下三个方面：</p>
<p>对每个测试数据集，统计计算不同搜索算法搜索成功的ASL；<br>对每个测试数据集运行多次获得不同搜索算法的运行时间的平均值；<br>绘制算法实际运行结果（ASL和运行时间）的曲线图，验证和理论分析的时间复杂度的吻合性。</p>
<h1 id="二、需求分析"><a href="#二、需求分析" class="headerlink" title="二、需求分析"></a>二、需求分析</h1><p>对于不同数据序列，我们都有多种方法来搜索，合适的算法可以节约大量时间和空间的开销，如何判断最高效的方法尤为重要。</p>
<p>程序通过对不同大小的随机和顺序序列用顺序搜索、折半搜索、二叉搜索树搜索、平衡二叉搜索树搜索。分析不同算法的平均运行时间，得到不同大小，不同顺序下最优的搜索方法。
 </p>
<h1 id="三、设计"><a href="#三、设计" class="headerlink" title="三、设计"></a>三、设计</h1><h2 id="3-1-设计思想"><a href="#3-1-设计思想" class="headerlink" title="3.1 设计思想"></a>3.1 设计思想</h2><p><img src="https://imgbed.cheney.cc/picgo/1844e5ca63be4512ac73fc3d3a0786b6-20220405210737430-20220405210753026.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<h3 id="（1）数据结构设计"><a href="#（1）数据结构设计" class="headerlink" title="（1）数据结构设计"></a>（1）数据结构设计</h3><p>两个动态数组AB大小为用户输入的数据，分别用来存储无序和有序序列。<br>两个二叉搜索树，一个用无序序列构建，另一个用有序序列构建。<br>类似的还有两个平衡二叉搜索树，一个用无序序列构建，另一个用有序序列构建。<br>还有一些数组用来存储搜索到的值以及中间结果。</p>
<h3 id="（2）算法设计"><a href="#（2）算法设计" class="headerlink" title="（2）算法设计"></a>（2）算法设计</h3><p><img src="https://imgbed.cheney.cc/picgo/4daed30015ce4a67a90028e6d7395411-20220405210737465-20220405210753061.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<h2 id="3-2-详细设计"><a href="#3-2-详细设计" class="headerlink" title="3.2 详细设计"></a>3.2 详细设计</h2><h3 id="首先是两种树的设计："><a href="#首先是两种树的设计：" class="headerlink" title="首先是两种树的设计："></a>首先是两种树的设计：</h3><p><strong>二叉搜索树：</strong><br>由二叉树的递归定义性质，二叉排序树的查找同样可以使用如下递归算法查找。<br>如果树是空的，则查找结束，无匹配。<br>如果被查找的值和根结点的值相等，查找成功。否则就在子树中继续查找。如果被查找的值小于根结点的值就选择左子树，大于根结点的值就选择右子树。<br>二叉排序的插入是建立在二叉排序的查找之上的，插入一个结点，就是通过查找发现该结点合适插入位置，把结点直接放进去。 其实一步步构造二叉排序树的过程中就是结点插入过程。二叉排序树插入规则如下：若查找的key已经有在树中，则p指向该数据结点。若查找的key没有在树中，则p指向查找路径上最后一个结点。</p>
<p><strong>平衡二叉搜索树</strong><br>在构造二叉排序树的时候，每当插入一个节点时，先检查是否因插入节点而破坏了树的平衡性，如果是，则找出其中最小不平衡子树，在保持排序树的前提下，调整最小不平衡子树中各节点之间的连接关系，以达到新的平衡，其中最小平衡子树是指：离插入节点最近，且平衡因子绝对值大于1的节点作为根节点的子树。</p>
<p><strong>调整最小不平衡子树一般有四种情况：</strong></p>
<ul>
<li>单向右旋(LL型)：<br>插入位置为左子树的左子树，以左子树为轴心，进行单次向右旋转，如下图所示。节点旁边的数字为该节点的平衡因子，I节点为当前插入节点(如果I节点处于正中，则表示I节点既可以是左孩子也可以是右孩子。</li>
<li>单向左旋(RR型)： 插入位置为右子树的右子树，右子树为轴心，进行单次向左旋转</li>
<li>双向旋转先左后右(LR型)：插入位置为左子树的右子树，要进行两次旋转，先向左旋转，再向右旋转。</li>
<li>双向旋转先右后左(RL型)：插入位置为右子树的左子树，进行两次调整，先右旋转再左旋转；处理情况与LR类似。<br>平衡因子与类型有很大的关系，需要以离插入节点最近且平衡因子绝对值&gt;1的节点作为根节点的子树进行判定是哪种类型。</li>
</ul>
<p>生成序列MakeRandT的设计：由于序列长度N，和两种数据序列已经被定义为全局变量与函数故此函数不需要参数，每次创建随机序列中的值的范围设定在100 * N到1000 * N之间。</p>
<p>创建无序序列A的方法：</p>
<figure class="highlight cpp"><table><tr><td class="gutter"><div class="code-wrapper"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></div></td><td class="code"><pre><code class="hljs cpp"><span class="hljs-built_in">srand</span>((<span class="hljs-type">unsigned</span>)<span class="hljs-built_in">time</span>(<span class="hljs-literal">NULL</span>));<br><span class="hljs-keyword">for</span> (<span class="hljs-type">int</span> i = <span class="hljs-number">0</span>; i &lt; N; i++) &#123;<br>		A[i] = <span class="hljs-built_in">rand</span>() / (<span class="hljs-type">double</span>)RAND_MAX * (Max - Min) + Min;<br>		B[i] = A[i];<br>	&#125;<br></code></pre></td></tr></table></figure>

<p>此时B和A完全一样，然后只需对B进行排序即可获得与A对应的有序序列，这里为了方便直接利用Sort函数进行排序。然后两个序列就生成完毕。</p>
<p>统计程序运行时间：用time.h里面的clock函数，在main函数中分别在每个搜索语句开始和结尾统计运行时间，并保存在time[]数组内。<br>start = clock();。。。。<br>finish = clock();<br>timt[i] = (double)(finish - start) / CLOCKS_PER_SEC;</p>
<p>程序中涉及到的搜索结果：<br>►有/无序序列顺序搜索：搜索到的结果为前n大的元素在序列数组中的位置（下标）分别存在M1、M2中。<br>►对无序序列二叉(折半)搜索：搜索到的结果为前n大的元素在序列数组中的位置（下标）存在S中<br>►对有/无序序列用二叉搜索树搜索：分别先把对于序列建树T1、T2，搜索结果不保存<br>►对有/无序序列用平衡二叉搜索树搜索：分别先把对于序列建树AVLTree1、AVLTree2，搜索结果不保存。</p>
<h1 id="四、用户手册："><a href="#四、用户手册：" class="headerlink" title="四、用户手册："></a>四、用户手册：</h1><p>打开程序后会自动显示输入长度，输入待搜索序列的长度后按回车，系统会不断显示当前搜索算法搜索到的值，待所有算法均结束后，系统自动清屏，然后显示各个算法所用时间。<br>每次输入不同的长度，统计每个长度对应的各种搜索算法的时间，绘制图表，与理论情况对比。</p>
<p> </p>
<h1 id="五、测试数据及测试结果："><a href="#五、测试数据及测试结果：" class="headerlink" title="五、测试数据及测试结果："></a>五、测试数据及测试结果：</h1><p>测试输入：5000<br> <img src="https://imgbed.cheney.cc/picgo/9af88e496e194ca5a7ff2007751f01b9-20220405210753124.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"><br>测试输入：10000<br> <img src="https://imgbed.cheney.cc/picgo/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAQ2hlbmV5ODIy,size_14,color_FFFFFF,t_70,g_se,x_16-20220405210753165.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<p>测试输入：20000<br><img src="https://imgbed.cheney.cc/picgo/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAQ2hlbmV5ODIy,size_14,color_FFFFFF,t_70,g_se,x_16-20220405210737766-20220405210753204.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<p>测试输入：30000<br><img src="https://imgbed.cheney.cc/picgo/20459da0aa1c4852a1f951b642bd7815-20220405210753244.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<p>测试输入：50000<br><img src="https://imgbed.cheney.cc/picgo/e1fcd06430c54f0c9ff0da2b8a362095-20220405210753285.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<p>将得到的数据整理成表格：<br><img src="https://imgbed.cheney.cc/picgo/3428257ff2bd4bd68422c9504e6277ae-20220405210753321.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<p>由此做出的搜索时间与搜索数量的折线图为：<br>  <img src="https://imgbed.cheney.cc/picgo/3018996254604e3ba8b16c2eddce1c7d-20220405210753356.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"><br><img src="https://imgbed.cheney.cc/picgo/0d336424743d45168d37617e311f6a4e-20220405210753391.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<p><img src="https://imgbed.cheney.cc/picgo/426f3c93dbe743238a47f1b650422334-20220405210753427.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"><br><img src="https://imgbed.cheney.cc/picgo/df069356230a4f90a2f8c2baca1362fe-20220405210753461.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<p> <img src="https://imgbed.cheney.cc/picgo/f1392503dd3d4b5aac010610b2b11068-20220405210753497.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"><br><img src="https://imgbed.cheney.cc/picgo/2714468c96444808befb09572655028f-20220405210753533.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<p>  <img src="https://imgbed.cheney.cc/picgo/7cf0076fe28b493fa0dcd019f5b8ff55-20220405210753569.png" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<p>用以上图表和已知的不同搜索算法的ASL做对比，发现上述图像在一定程度上符合规律，这说明本程序有一定的可靠性但仍有较大的改进空间。</p>

            </div>
            <hr>
            <div>
              <div class="post-metas mb-3">
                
                  <div class="post-meta mr-3">
                    <i class="iconfont icon-category"></i>
                    
                      <a class="hover-with-bg" href="/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/">数据结构</a>
                    
                  </div>
                
                
                  <div class="post-meta">
                    <i class="iconfont icon-tags"></i>
                    
                      <a class="hover-with-bg" href="/tags/%E4%BA%8C%E5%8F%89%E6%A0%91/">二叉树</a>
                    
                      <a class="hover-with-bg" href="/tags/%E6%90%9C%E7%B4%A2/">搜索</a>
                    
                  </div>
                
              </div>
              
                <p class="note note-warning">
                  
                    本博客所有文章除特别声明外，均采用 <a target="_blank" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh" rel="nofollow noopener noopener">CC BY-SA 4.0 协议</a> ，转载请注明出处！
                  
                </p>
              
              
                <div class="post-prevnext">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2020/12/07/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E5%AE%9E%E9%AA%8C--%E5%9B%BE%E7%9A%84%E4%B8%89%E7%A7%8D%E7%AE%97%E6%B3%95%E7%9A%84%E5%90%8C%E6%AD%A5%E6%BC%94%E7%A4%BA/">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">图的三种算法的同步演示</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2020/12/05/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E5%AE%9E%E9%AA%8C--%E6%8E%92%E5%BA%8F%E7%AE%97%E6%B3%95%E5%BA%94%E7%94%A8%E5%8F%8A%E5%AF%B9%E6%AF%94/">
                        <span class="hidden-mobile">排序算法应用及对比</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>
    
      <div class="d-none d-lg-block col-lg-2 toc-container" id="toc-ctn">
        <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;目录</p>
  <div class="toc-body" id="toc-body"></div>
</div>

      </div>
    
  </div>
</div>

<!-- Custom -->


    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
    

    
  </main>

  <footer class="text-center mt-5 py-3">
  <div class="footer-content">
     <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://cheney822.gitee.io/" target="_blank" rel="nofollow noopener"><span>备用网址</span></a> 
  </div>
  

  
  <!-- 备案信息 -->
  <div class="beian">
    <span>
      <a href="http://beian.miit.gov.cn/" target="_blank" rel="nofollow noopener">
        皖ICP备2022002876号-1
      </a>
    </span>
    
  </div>


  
</footer>


  <!-- SCRIPTS -->
  
  <script  src="https://cdn.jsdelivr.net/npm/nprogress@0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nprogress@0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js" ></script>
<script  src="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>

<!-- Plugins -->


  <script  src="/js/local-search.js" ></script>



  
    <script  src="/js/img-lazyload.js" ></script>
  



  



  
    <script  src="https://cdn.jsdelivr.net/npm/tocbot@4/dist/tocbot.min.js" ></script>
  
  
    <script  src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3/dist/jquery.fancybox.min.js" ></script>
  
  
    <script  src="https://cdn.jsdelivr.net/npm/anchor-js@4/anchor.min.js" ></script>
  
  
    <script defer src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js" ></script>
  






  <script  src="https://cdn.jsdelivr.net/npm/typed.js@2/lib/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var title = document.getElementById('subtitle').title;
      
        typing(title);
      
    })(window, document);
  </script>















<!-- 主题的启动项 保持在最底部 -->
<script  src="/js/boot.js" ></script>


</body>
</html>
